{% extends "admin/base.html" %}
{% block content %}
<script type="text/javascript" src="/static/js/highslide/highslide-full.min.js"></script>
<link rel="stylesheet" type="text/css" href="/static/js/highslide/highslide.css" />
<script type="text/javascript">
	hs.graphicsDir = '/static/js/highslide/graphics/';
	hs.align = 'center';
	hs.transitions = ['expand', 'crossfade'];
	hs.outlineType = 'rounded-white';
	hs.fadeInOut = true;
	hs.dimmingOpacity = 0.75;
	hs.lang.creditsText='iyouf.info'
	hs.lang.creditsTitle='Go To iyouf.info Homepage'
	hs.creditsPosition='top center'
	hs.creditsHref='http://iyouf.info';
	hs.useBox = true;
	hs.width = 640;
	hs.height = 480;
	hs.addSlideshow({
		interval: 5000,
		repeat: false,
		useControls: true,
		fixedControls: 'fit',
		overlayOptions: {
			opacity: 1,
			position: 'bottom center',
			hideOnMouseOut: true
		}
	});
</script>
<div class="wrap">
 <h2>照片</h2>
 <form id="file-form" action="/admin/upload_photo" method="post" enctype="multipart/form-data">
  <input type="hidden" name="albumid" value="{{album.id}}"/>
	<div id="html-upload-ui">
		<p id="async-upload-wrap">
		<input type="file" id="file" name="file"> 
			<input type="submit" value="上传" name="html-upload" class="button"> 
		</p>
		<br class="clear">
		</div>
	</form>
	<div class="highslide-gallery">
	{%for photo in album.photos%}
			<a href="/media/{{photo.image}}" class="highslide" onclick="return hs.expand(this)">
				<img src="/media/{{photo.thumb_image}}" alt="Highslide JS"
					title="Click to enlarge" />
			</a>
			<div class="highslide-caption">
				{{photo.description}}
			</div>
	{%endfor%}
	</div>
</div>
{%endblock%}